package bma.common.netty.protobuf.core;

import bma.common.langutil.ai.stack.AIStack;
import bma.common.netty.protobuf.core.BaseProtos.PRequest;

public interface PClient {

	public boolean isOpen();

	public void addCloseListener(PClientCloseListener lis);

	// return requestId
	public int write(AIStack<PResponseContext> stack, PRequest request,
			Object data, int timeout);
	
	public void writeAndClose(PRequest request, Object data);

	public void discard(int requestId);
}
